using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            start:
            Console.WriteLine("Input the upper limit of the Fibonacci numbers");
            try
            {
                long a = Convert.ToInt16(Console.ReadLine());
           if (a<1)
           {
               Console.WriteLine("Error.");
               Console.WriteLine();
               goto start;
           }
            double n1, n2;
            n1 = 1;
            n2 = 1;
            Console.WriteLine("1");
            for (double n3 = 1; n3 <= a;)
            {
                Console.WriteLine("{0}",n3);
                n3 = n1 + n2;
                n1 = n2;
                n2 = n3;
            }
            Console.ReadKey();
             }
            catch
            {
                Console.WriteLine("Error.");
            }
            Console.WriteLine();
            goto start;
        }
    }
}
